package pers.fjl.test.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import pers.fjl.common.constant.MessageConstant;
import pers.fjl.common.entity.QueryPageBean;
import pers.fjl.common.entity.Result;
import pers.fjl.test.annotation.LoginRequired;
import pers.fjl.test.service.CashierService;
import pers.fjl.test.service.DeptService;

import javax.annotation.Resource;

/**
 * 后台管理模块收银台列表
 *
 * @author fangjiale 2020年1月3日
 */

@Api(value = "后台管理模块收银台列表", description = "后台管理模块收银台列表的接口信息")
@RequestMapping("/manage/cashier")
@RestController
@CrossOrigin
public class CashierController {
    @Resource
    private CashierService cashierService;

    @LoginRequired
    @ApiOperation(value = "分页查询", notes = "返回分页数据")
    @PostMapping("/findPage")
    public Result findPage(@RequestBody QueryPageBean queryPageBean) {
        return new Result(true, MessageConstant.OK, "获取分页数据成功", cashierService.findPage(queryPageBean));
    }
}
